# Contributor: Jakub Jirutka <jakub@jirutka.cz>
# Maintainer: Jakub Jirutka <jakub@jirutka.cz>
pkgname=greetd-wlgreet
_projname=wlgreet
pkgver=0.5.0
pkgrel=0
pkgdesc="Raw wayland greeter for greetd"
url="https://git.sr.ht/~kennylevinsen/wlgreet"
# riscv64, s390x: blocked by greetd
# loongarch64: blocked by libc crate
arch="all !riscv64 !s390x !loongarch64"
license="GPL-3.0-only"
depends="
	greetd
	wayland-libs-client
	"
makedepends="
	cargo
	cargo-auditable
	wayland-dev
	"
source="$pkgname-$pkgver.tar.gz::https://git.sr.ht/~kennylevinsen/wlgreet/archive/$pkgver.tar.gz"
builddir="$srcdir/$_projname-$pkgver"
options="!check"  # no tests provided

export CARGO_PROFILE_RELEASE_OPT_LEVEL="z"

prepare() {
	default_prepare

	cargo fetch --target="$CTARGET" --locked
}

build() {
	cargo auditable build --frozen --release
}

package() {
	install -D -m755 target/release/wlgreet -t "$pkgdir"/usr/bin/
}

sha512sums="
4e84dee56b69285139cbc4ac50a03022bc2e1b44aea2ce31a66a2ca2e54562bb511761315a4a6dd7bb343552dac6a24530b318549acc0f7f876f993948e44ef7  greetd-wlgreet-0.5.0.tar.gz
"
